package com.etsoft.comm.generate;

import com.etsoft.comm.tool.*;

public class Render1_Dao {

	public static void create(GContext ctx) throws Exception {
		String fileStr = ctx.getSampleStr(SampleFile.Mapper);

		// ★ 开始拼字符串
		// fileStr = fileStr.replaceFirst("##ClassNameSuffix#", ctx.getClassName(true));
		fileStr = fileStr.replace("##ModelClassName#", ctx.getClassNameSuffix(SampleFile.Model));
		fileStr = fileStr.replace("##DaoClassName#", ctx.getClassNameSuffix(SampleFile.Mapper));
		fileStr = fileStr.replace("##project_name#", ctx.project_name);

		// 输出内容
		FileHelper.writeFile(ctx.getFileFullPath(SampleFile.Mapper), ctx.getTable_name(), fileStr);
	}

}
